package com.project.purchase.Service.Imp;

import com.project.purchase.Service.Iindent;
import com.project.purchase.entity.Indent;
import com.project.purchase.mapper.IndentMapper;
import com.project.purchase.vo.IndentWithPersonProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author VX5
 * @Title: QZP
 * @ProjectName purchase
 * @Description: TODO
 * @date ${DAT}0:57
 */
@Service
public class IndentImp implements Iindent {
    @Autowired
    IndentMapper indentMapper;

    @Override
    public List<IndentWithPersonProducer> GetAllIn() {
        return indentMapper.GetAllIn();
    }

    @Override
    public void addPerosn(Indent indent) {
        indentMapper.insertSelective(indent);
    }

    @Override
    public void UpdateAdminCheck(Map<String, Object> map) {
        indentMapper.UpdateAdminCheck(map);
    }

    @Override
    public List<IndentWithPersonProducer> getByID(String id) {
        return indentMapper.GetAllInByID(id);
    }

    @Override
    public void UpdatePerson(Indent indent) {
        indentMapper.updateByPrimaryKeySelective(indent);
    }

    @Override
    public void deletIndentById(String id) {
        indentMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<IndentWithPersonProducer> GetAllInByProducerNameModel(Map<String, Object> map) {
        return indentMapper.GetAllInByProducerNameModel(map);
    }
}
